@extends('layouts.admin')

@section('title')
    系统提示
@stop

@section('content')
    <div class="container">
        <div class="sysmessage">
            <div class="message">
                <h3 class="{{$type or 'success'}}">{!! $message !!}</h3>
                <div class="tips">{!! $tips !!}</div>

                <div class="links">
                    @if($links)
                        @foreach($links as $link)
                            <a href="{{$link[1]}}"@if(isset($link[2])) target="{{$link[2]}}"@endif>{{$link[0]}}</a>
                        @endforeach
                    @else
                        <a href="{{$redirectTo or back()->getTargetUrl()}}">{{trans('sysmessage.go_back')}}</a>
                    @endif
                </div>
            </div>
        </div>
    </div>
    @if($autoredirect)
        <script type="text/javascript">
            var second = 5;
            var timeid = setInterval(function(){
                second--;
                if(second<1){
                    clearTimeout(timeid);
                    window.location = '{{$redirectTo or ''}}';
                }else {
                    $("#timer").text(second);
                }
            },1000);
        </script>
    @endif
@stop
